package com.assets.room.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.assets.room.entity.Allotdetail;

import java.util.List;

@Dao
public interface AllotdetailDao {

    @Insert
    void insert(Allotdetail allotdetail);

    @Insert
    void insert(List<Allotdetail> allotdetail);

    @Query("SELECT * FROM t_asset_allot_allotdetail")
    List<Allotdetail> getAllData();

    @Query("SELECT * FROM t_asset_allot_allotdetail WHERE allot_id = :allot_id")
    List<Allotdetail> getAllDataById(String allot_id);

    @Query("DELETE FROM t_asset_allot_allotdetail")
    void deleteAllData();

}
